<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>
        // &&
        var b1 = true;
        var b2 = false;
        var b3 = b1 && b2;
        console.log('b1 = ' + b1 + ', b2 = ' + b2 + ', b1 && b2 = ' + b3);

        // !
        var b1 = true;
        var b2 = !b1;
        console.log('b1 = ' + b1 + ', !b1 = ' + b2);

        // ||
        var b1 = true;
        var b2 = false;
        var b3 = b1 || b2;
        console.log('b1 = ' + b1 + ', b2 = ' + b2 + ', b1 || b2 = ' + b3);
    </script>

</body>

</html>

<!-- 表达式和运算符 -->
<!-- https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators -->

<!-- 逻辑运算符：&&  , || 和 ! -->
<!-- https://developer.mozilla.org/zh-CN/docs/Learn/JavaScript/Building_blocks/conditionals#%E9%80%BB%E8%BE%91%E8%BF%90%E7%AE%97%E7%AC%A6%EF%BC%9A_%E5%92%8C_! -->